CREATE EXTERNAL TABLE jms_dm.dm_collect_ready_send_rate(
  manage_region_code string COMMENT '管理大区code', 
  manage_region_name string COMMENT '管理大区name', 
  collect_agent_code string COMMENT '代理区code', 
  collect_agent_name string COMMENT '代理区name', 
  franchisee_code string COMMENT '加盟商code', 
  franchisee_name string COMMENT '加盟商name', 
  collect_scansitecode string COMMENT '集散点code', 
  collect_inputsite string COMMENT '集散点name', 
  order_source string COMMENT '订单来源', 
  center_send_collect_total int COMMENT '中心发往集散总票数', 
  collect_already_send_total int COMMENT '集散已散货总票数', 
  collect_ready_send_total int COMMENT '集散待散货总票数', 
  collect_wrong_send_total int COMMENT '集散错分总票数', 
  collect_unintime_unarrival_total int COMMENT '集散散货不及时且未到件总票数', 
  collect_arrival_total int COMMENT '集散到件票数', 
  is_all_missed_rate string COMMENT '集散待散占比', 
  update_time string COMMENT '更新日期', 
  is_reback int COMMENT '是否退件 1是退件 0否')
COMMENT '集散待散货明细'
PARTITIONED BY ( 
  dt string COMMENT '时间分区(yyyy-MM-dd)')
stored as parquet
LOCATION '/dw/hive/jms_dm.db/external/dm_collect_ready_send_rate'
TBLPROPERTIES (     'discover.partitions' = 'false',  'parquet.column.index.access' = 'true');
-------------------
alter table jms_dm.dm_collect_ready_send_rate
add columns(
should_hand_in_num int comment '出港-应交件汇总'
,delivered_cnt int comment '出港-已交件票数'
) cascade
